<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <!--   <meta charset="UTF-8">宜春市公安局袁州分局 -->
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="网络举报平台">
    <meta name="keywords" content="袁州区,公安局,网络举报,违法犯罪">
    <title>宜春市公安局袁州分局网络举报平台</title>

    <!-- Bootstrap CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome -->
    <link href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.0.0/css/all.min.css" rel="stylesheet">

    <style>
        body {
            background-color: #f8f9fa;
            font-family: 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
        }

        .header-banner {
            background: url('/images/header_yuantai.png') center/cover no-repeat;
            height: 180px;
            position: relative;
            border-radius: 0 0 20px 20px;
            overflow: hidden;
        }

        .query-button-container {
            position: absolute;
            top: 20px;
            right: 20px;
            z-index: 10;
        }

        .query-button {
            background-color: #0d47a1; /* Deep blue */
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 5px;
            cursor: pointer;
            font-size: 1rem;
            transition: background-color 0.3s ease;
        }

        .query-button:hover {
            background-color: #0a3a82; /* Slightly darker blue */
        }

        .header-title {
            color: white;
            font-size: 2.5rem;
            font-weight: bold;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
            display: none;
        }

        .header-subtitle {
            font-size: 1.5rem;
            margin-top: 0.5rem;
            display: none;
        }

        .notice-card {
            background: white;
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.1);
            margin: 2rem 0;
            border: 2px solid #0d47a1;
        }

        .notice-header {
            background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
            color: white;
            padding: 1.5rem;
            border-radius: 15px 15px 0 0;
            text-align: center;
        }

        .notice-content {
            padding: 2rem;
            font-size: 1.05rem; /* 统一内容字体大小 */
            line-height: 1.8; /* 调整行高 */
        }

        .notice-content p {
            text-indent: 2em; /* 段落首行缩进 */
        }

        .notice-section {
            margin-bottom: 1.5rem; /* 调整段落间距 */
        }

        .notice-section h5 {
            color: #1e3c72;
            border-bottom: none; /* 移除下划线 */
            padding-bottom: 0.5rem;
            margin-bottom: 0.5rem; /* 调整标题与内容间距 */
            font-weight: bold;
            font-size: 1.2rem; /* 调整主编号字体大小 */
        }

        .btn-primary {
            background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
            border: none;
            padding: 0.75rem 2rem;
            font-weight: 500;
            border-radius: 25px;
            transition: all 0.3s ease;
        }

        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(30, 60, 114, 0.4);
        }

        .checkbox-container {
            background: #f8f9fa;
            border: 2px solid #dee2e6;
            border-radius: 10px;
            padding: 1rem;
            margin: 2rem 0;
            text-align: center;
        }

        .checkbox-container.checked {
            border-color: #1e3c72;
            background: rgba(30, 60, 114, 0.05);
        }

        .modal-header.bg-primary {
            background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%) !important;
        }

        .modal-footer .btn-primary {
            background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
            border: none;
            color: white;
        }

        /* 简化提示样式，使其更简洁和威严，类似普通段落 */
        .alert-warning, .alert-info {
            background-color: transparent; /* 背景透明 */
            border: none; /* 移除边框 */
            color: #343a40; /* 默认文本颜色 */
            padding: 0; /* 移除内边距 */
            border-radius: 0;
            margin-top: 0; /* 移除顶部外边距 */
            margin-bottom: 0; /* 移除底部外边距 */
        }

        .alert-warning p, .alert-info p {
            margin-bottom: 0; /* 移除段落间距 */
            font-size: 1.05rem; /* 与notice-content字体大小一致 */
            line-height: 1.8;
        }

        .notice-content ul {
            list-style: none; /* 移除列表样式 */
            padding-left: 0;
            margin-top: 0;
        }
        .notice-content ul li {
            margin-bottom: 0;
            font-size: 1.05rem;
            line-height: 1.8;
        }
        .notice-content ul li strong {
            font-weight: normal; /* 列表项中的加粗文本改为正常 */
        }

        .form-check-label {
            font-weight: normal !important; /* 复选框标签文本正常粗细 */
            font-size: 1rem;
        }

        @media (max-width: 768px) {
            .header-title {
                font-size: 1.8rem;
            }

            .notice-content {
                padding: 1rem;
                font-size: 0.95rem; /* 移动端内容字体略小 */
            }
            .notice-section h5 {
                font-size: 1.1rem; /* 移动端主编号字体略小 */
            }
        }

        .main-buttons-container {
            display: block; /* Change to block for vertical stacking */
            text-align: center;
            margin-top: 2rem;
            margin-bottom: 2rem;
        }

        .main-buttons-container button {
            margin: 10px auto; /* Add vertical margin and auto horizontal margin for centering */
            display: block; /* Ensure buttons take full width and stack */
        }

        .btn-filled {
            background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
            border: none;
            color: white;
            padding: 18px 80px; /* Increased padding to make it longer */
            font-size: 1.35rem; /* Increased font size */
            font-weight: 600;
            border-radius: 30px;
            box-shadow: 0 4px 15px rgba(30, 60, 114, 0.3);
            transition: all 0.3s ease;
        }

        .btn-filled:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(30, 60, 114, 0.4);
        }

        .btn-outlined {
            background: white;
            color: #1e3c72;
            border: 2px solid #1e3c72;
            padding: 18px 80px; /* Increased padding to make it longer */
            font-size: 1.35rem; /* Increased font size */
            font-weight: 600;
            border-radius: 30px;
            transition: all 0.3s ease;
        }

        .btn-outlined:hover {
            background-color: #f0f4f8;
            transform: translateY(-2px);
            box-shadow: 0 4px 15px rgba(30, 60, 114, 0.1);
        }

        .modal-footer .btn-modal-filled {
            background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
            border: none;
            color: white;
            padding: 10px 25px;
            font-size: 1.1rem;
            font-weight: 500;
            border-radius: 25px;
            transition: all 0.3s ease;
        }

        .modal-footer .btn-modal-filled:hover {
            transform: translateY(-1px);
            box-shadow: 0 3px 10px rgba(30, 60, 114, 0.3);
        }

        .modal-footer .btn-modal-outlined {
            background: white;
            color: #1e3c72;
            border: 2px solid #1e3c72;
            padding: 10px 25px;
            font-size: 1.1rem;
            font-weight: 500;
            border-radius: 25px;
            transition: all 0.3s ease;
        }

        .modal-footer .btn-modal-outlined:hover {
            background-color: #f0f4f8;
            transform: translateY(-1px);
            box-shadow: 0 3px 10px rgba(30, 60, 114, 0.1);
        }

        .bg-deep-blue {
            background-color: #1a2b4a !important;
        }
    </style>
</head>
<body>
    <!-- 头部横幅 -->
    <div class="header-banner">
        <!-- 图片已经包含文字和图标，无需额外HTML元素叠加 -->
    </div>

    <!-- 导航栏 -->
    <!-- REMOVED: Navigation bar HTML -->

    <!-- 主要内容 -->
            <div class="container">
        <p style="font-size: 1.25rem; font-weight: bold; color: #1e3c72; margin-bottom: 0.5rem; padding: 1rem; background-color: rgba(13, 71, 161, 0.05); border-radius: 10px; text-indent: 2em;">
            为维护袁州辖区平安祥和，进一步提升人民群众安全感满意度，针对夏季治安突出问题，宜春市公安局袁州分局组织开展夏季治安打击整治百日行动，特面向社会各界公开征集各类违法犯罪线索。
                        </p>
        <!-- 网上举报须知 -->
        <div class="notice-card">
            <div class="notice-header">
                <h3>网上举报须知</h3>
            </div>
            <div class="notice-content">
                <!-- 一、公安机关举报网站受理范围 -->
                <div class="notice-section">
                    <h5>一、公安机关举报网站受理范围：</h5>
                    <p>
                        刑事犯罪案件举报包括：盗窃、抢劫、诈骗等侵财犯罪；故意伤害、寻衅滋事等暴力犯罪；毒品犯罪案件；网络犯罪案件。治安违法行为举报包括：赌博、卖淫嫖娼等违法行为；扰乱公共秩序行为；非法经营、制售假冒伪劣商品；其他违反治安管理法律法规的行为。
                            </p>
                        </div>

                <!-- 二、重要提醒 -->
                <div class="notice-section">
                    <h5>二、根据相关法律法规，举报人在举报、控告、申诉活动中必须对所举报、控告、申诉的事实的真实性负责。</h5>
                    <div>
                        <p>接受调查、询问时，应如实提供情况和证据。如有隐瞒、制造假证行为，必须承担纪律和法律责任。</p>
                    </div>
                </div>

                <!-- 三、分级负责原则 -->
                <div class="notice-section">
                    <h5>三、根据"分级负责"原则，请您按照被举报人属地和级别，选择相应的举报网站进行举报。</h5>
            </div>

                <!-- 四、实名举报提倡 -->
                <div class="notice-section">
                    <h5>四、公安机关提倡实名举报（请填写真实姓名、身份证号和准确联系方式等内容）。</h5>
                            </div>

                <!-- 温馨提示 -->
                <div class="notice-section">
                    <h5 style="border-bottom: 2px solid #e9ecef; padding-bottom: 0.5rem;">温馨提示</h5>
                    <p>1. 隐私保密：公安机关保护举报人隐私。</p>
                    <p>2. 如实填报：虚假举报或恶意举报将追究相关法律责任。</p>
                    <p>3. 联系畅通：请保持联系方式畅通，以便及时沟通。</p>
                                    </div>

                <!-- 确认阅读 -->
                <div class="checkbox-container" id="confirmContainer">
                    <div class="form-check">
                        <input class="form-check-input" type="checkbox" id="confirmRead" onchange="toggleReportButton()">
                        <label class="form-check-label" for="confirmRead">
                            我已阅读以上条款
                        </label>
                    </div>
                </div>

                <!-- 举报按钮 -->
                <div class="main-buttons-container">
                    <button type="button" class="btn-filled" id="reportBtn" onclick="goToReport()" disabled>
                        <i class="fas fa-paper-plane me-2"></i>
                        立即举报
                    </button>
                </div>
            </div>
        </div>
    </div>

    <!-- SMS Verification Modal for Report -->
    <div class="modal fade" id="smsVerificationModal" tabindex="-1" aria-labelledby="smsVerificationModalLabel" aria-hidden="true">
        <div class="modal-dialog modal-dialog-centered">
            <div class="modal-content">
                <div class="modal-header bg-primary text-white">
                    <h5 class="modal-title" id="smsVerificationModalLabel">手机验证</h5>
                    <button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal" aria-label="Close"></button>
                </div>
                <div class="modal-body">
                        <div class="mb-3">
                        <label for="reportPhone" class="form-label">手机号码</label>
                        <input type="tel" class="form-control" id="reportPhone" placeholder="请输入手机号码">
                        </div>
                        <div class="mb-3">
                        <label for="reportSmsCode" class="form-label">验证码</label>
                        <div class="input-group">
                            <input type="text" class="form-control" id="reportSmsCode" placeholder="请输入验证码">
                            <button class="btn btn-outline-primary" type="button" id="getReportSmsCodeBtn">获取验证码 <span id="countdownReportSpan"></span></button>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn-modal-outlined" data-bs-dismiss="modal">返回</button>
                    <button type="button" class="btn-modal-filled" id="verifyAndReportBtn">验证并举报</button>
                </div>
            </div>
        </div>
    </div>

    <!-- 页脚 -->
    <footer class="bg-deep-blue text-light py-4 mt-5">
        <div class="container">
            <div class="row">
                <div class="col-md-12 text-center">
                    <p class="mb-0">
                        &copy; 2025 宜春市公安局袁州分局 版权所有
                    </p>
                </div>
            </div>
        </div>
    </footer>

    <!-- Bootstrap JS -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>

    <script>
        let countdownInterval;
        let timeLeft = 60; // 60 seconds

        function openSmsVerificationModal() {
            const smsVerificationModal = new bootstrap.Modal(document.getElementById('smsVerificationModal'));
            smsVerificationModal.show();
        }

        document.getElementById('getReportSmsCodeBtn').addEventListener('click', function() {
            const phone = document.getElementById('reportPhone').value;
            if (!/^1[3-9]\d{9}$/.test(phone)) {
                alert('请输入正确的手机号码');
                return;
            }

            // Disable button and start countdown
            this.disabled = true;
            timeLeft = 60;
            document.getElementById('countdownReportSpan').textContent = `(${timeLeft}s)`;
            countdownInterval = setInterval(() => {
                timeLeft--;
                if (timeLeft <= 0) {
                    clearInterval(countdownInterval);
                    document.getElementById('getReportSmsCodeBtn').disabled = false;
                    document.getElementById('countdownReportSpan').textContent = '';
                    document.getElementById('getReportSmsCodeBtn').textContent = '获取验证码';
                } else {
                    document.getElementById('countdownReportSpan').textContent = `(${timeLeft}s)`;
                }
            }, 1000);

            // Send SMS request
            fetch('http://localhost:3000/api/send-sms', {
                method: 'POST',
                headers: {
                    'Content-Type': 'application/json'
                },
                body: JSON.stringify({ phone: phone })
            })
            .then(response => response.json())
            .then(data => {
                if (data.success) {
                    alert('验证码已发送');
                } else {
                    alert(data.message || '发送失败，请稍后重试');
                    clearInterval(countdownInterval);
                    document.getElementById('getReportSmsCodeBtn').disabled = false;
                    document.getElementById('countdownReportSpan').textContent = '';
                    document.getElementById('getReportSmsCodeBtn').textContent = '获取验证码';
                }
            })
            .catch(error => {
                console.error('Error sending SMS:', error);
                alert('发送失败，请稍后重试');
                clearInterval(countdownInterval);
                document.getElementById('getReportSmsCodeBtn').disabled = false;
                document.getElementById('countdownReportSpan').textContent = '';
                document.getElementById('getReportSmsCodeBtn').textContent = '获取验证码';
            });
        });

        document.getElementById('verifyAndReportBtn').addEventListener('click', function() {
            const phone = document.getElementById('reportPhone').value;
            const smsCode = document.getElementById('reportSmsCode').value;

            // --- FOR TESTING ONLY: BYPASS SMS VERIFICATION ---
            if (phone && /^1[3-9]\d{9}$/.test(phone)) {
                alert('验证成功！即将跳转到举报页面 (测试模式)。');
                const smsVerificationModal = bootstrap.Modal.getInstance(document.getElementById('smsVerificationModal'));
                smsVerificationModal.hide();
                // 将手机号通过URL参数传递到提交页面
                window.location.href = `submit.html?phone=${encodeURIComponent(phone)}`;
            } else {
                alert('请输入正确的手机号码');
            }
            return; // Exit function to bypass actual SMS verification
            // --- END TEST BYPASS ---

            if (!phone || !smsCode) {
                alert('请填写手机号码和验证码');
                return;
            }

            fetch('/api/verify-sms', {
                method: 'POST',
                headers: {
                    'Content-Type': 'application/json'
                },
                body: JSON.stringify({ phone: phone, code: smsCode })
            })
            .then(response => response.json())
            .then(data => {
                if (data.success) {
                    alert('验证成功！即将跳转。');
                    const smsVerificationModal = bootstrap.Modal.getInstance(document.getElementById('smsVerificationModal'));
                    smsVerificationModal.hide();
                    // 将手机号通过URL参数传递到提交页面
                    window.location.href = `submit.html?phone=${encodeURIComponent(phone)}`;
                } else {
                    alert(data.message || '验证失败，请重试。');
                }
            })
            .catch(error => {
                console.error('Error verifying SMS:', error);
                alert('验证失败，请稍后重试。');
            });
        });

        function goToReport() {
            // Check if "我已阅读以上条款" is checked
            const confirmReadCheckbox = document.getElementById('confirmRead');
            if (!confirmReadCheckbox.checked) {
                alert('请先阅读并勾选"我已阅读以上条款"');
                return;
            }

            openSmsVerificationModal();
        }

        function toggleReportButton() {
            const confirmReadCheckbox = document.getElementById('confirmRead');
            const reportBtn = document.getElementById('reportBtn');
            const confirmContainer = document.getElementById('confirmContainer');

            if (confirmReadCheckbox.checked) {
                reportBtn.disabled = false;
                confirmContainer.classList.add('checked');
            } else {
                reportBtn.disabled = true;
                confirmContainer.classList.remove('checked');
            }
        }
    </script>
</body>
</html>
